/*! ******************************************************************************
 *
 * Created on 2021年9月25日
 *
 * Copyright(c) YuZhou Big Data Laboratory CO.,Ltd, 2022.  All rights reserved.
 *
 *******************************************************************************
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ******************************************************************************/
package org.eclipse.swt.widgets;

import org.yzbdl.lanius.core.plugins.metastore.LdrClassificationEntity;

/**
 * @author tanpeng@yzbdl.ac.cn
 * @version 1.0
 * @date 2022-08-02 11:19
 */
public class LaniusClassExpandItem extends ExpandItem {

	private LdrClassificationEntity ldrClassificationEntity;

	public LaniusClassExpandItem(ExpandBar parent, int style) {
		super(parent, style);
	}

	public LaniusClassExpandItem(ExpandBar var1, int var2, int var3) {
		super(var1, var2, var3);
	}

	public int getX() {
		return this.x;
	}

	public int getY() {
		return this.y;
	}

	@Override
	public int getHeight() {
		return this.height;
	}

	public int getWidth() {
		return this.width;
	}

	public LdrClassificationEntity getClassificationEntity() {
		return ldrClassificationEntity;
	}

	public void setClassificationEntity(LdrClassificationEntity ldrClassificationEntity) {
		this.ldrClassificationEntity = ldrClassificationEntity;
	}

	@Override
	public boolean isHover(int x, int y) {
		return super.isHover(x, y);
	}

	public boolean contain(int x, int y) {
		if (x >= super.x && x <= (super.x + super.width) && y >= super.y && y <= (super.y + super.getHeaderHeight())) {
			return true;
		}
		return false;
	}

}
